<template>
  <svg class="icon" :class="autoWidth && 'autoWidth'" aria-hidden="true">
    <use :xlink:href="'#' + name"></use>
  </svg>
</template>

<script setup>
defineProps({
  name: {
    default: '',
    type: String,
  },
  autoWidth: {
    default: false,
    type: Boolean,
  },
});
</script>
<style lang="less" scoped>
.autoWidth {
  width: 100%;
  height: 100%;
}
</style>
